package com.hsnn.medstgmini.base.dict.model;

import java.sql.Timestamp;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * 材质 实体类
 * @author hss@njhsnn
 * 2015年6月9日
 */
@Entity
@Table(name = "dic_drugmaterial_log")
public class DicDrugmaterialLog implements java.io.Serializable {

	// Fields

	/**
	 * 
	 */
	private static final long serialVersionUID = -4098818532736718405L;
	private String logId;//材质日志id
	private String materialId;//材质id
	private String materialCode;//材质编码
	private String materialName;//材质名称
	private Integer status;//状态 0 停用 1启用
	private Date updDatetime;//更新时间
	private String updUser;//更新人
	private Short sortId;//排序id
	
	private String beginDate;
	private String endDate;
	

	// Constructors

	/** default constructor */
	public DicDrugmaterialLog() {
	}

	/** minimal constructor */
	public DicDrugmaterialLog(String materialId, String materialCode,
			String materialName) {
		this.materialId = materialId;
		this.materialCode = materialCode;
		this.materialName = materialName;
	}

	/** full constructor */
	public DicDrugmaterialLog(String materialId, String materialCode,
			String materialName, Integer status, Timestamp updDatetime,
			String updUser, Short sortId) {
		this.materialId = materialId;
		this.materialCode = materialCode;
		this.materialName = materialName;
		this.status = status;
		this.updDatetime = updDatetime;
		this.updUser = updUser;
		this.sortId = sortId;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "log_id", unique = true, nullable = false, length = 36)
	public String getLogId() {
		return this.logId;
	}

	public void setLogId(String logId) {
		this.logId = logId;
	}

	@Column(name = "material_id", nullable = false, length = 36)
	public String getMaterialId() {
		return this.materialId;
	}

	public void setMaterialId(String materialId) {
		this.materialId = materialId;
	}

	@Column(name = "material_code", nullable = false, length = 10)
	public String getMaterialCode() {
		return this.materialCode;
	}

	public void setMaterialCode(String materialCode) {
		this.materialCode = materialCode;
	}

	@Column(name = "material_name", nullable = false, length = 100)
	public String getMaterialName() {
		return this.materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	/*	@Column(name = "upd_datetime", length = 19)
	public Timestamp getUpdDatetime() {
		return this.updDatetime;
	}

	public void setUpdDatetime(Timestamp updDatetime) {
		this.updDatetime = updDatetime;
	}*/


	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@Column(name = "upd_datetime", length = 19)
	public Date getUpdDatetime() {
		return updDatetime;
	}

	public void setUpdDatetime(Date updDatetime) {
		this.updDatetime = updDatetime;
	}
	
	
	@Column(name = "upd_user", length = 36)
	public String getUpdUser() {
		return this.updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Column(name = "sort_id")
	public Short getSortId() {
		return this.sortId;
	}

	public void setSortId(Short sortId) {
		this.sortId = sortId;
	}


	public String getBeginDate() {
		return beginDate;
	}

	public void setBeginDate(String beginDate) {
		this.beginDate = beginDate;
	}

	public String getEndDate() {
		return endDate;
	}

	public void setEndDate(String endDate) {
		this.endDate = endDate;
	}
	 
	

}